﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Excel = Microsoft.Office.Interop.Excel;

namespace DimensionAddIn
{
    public static class WorksheetExtention
    {
        public static Excel.Range XGetCell(this Excel.Worksheet worksheet, int row, int col)
        {
            return worksheet.Cells[row, col] as Excel.Range;
        }

        public static Excel.Range XGetRange(this Excel.Worksheet worksheet, int row1, int col1, int row2, int col2)
        {
            return worksheet.Range[worksheet.Cells[row1, col1], worksheet.Cells[row2, col2]];
        }
    }
}
